package com.room.search.web.rest;

import com.room.search.core.page.TableDataInfo;
import com.room.search.service.RoomBrokerService;
import com.room.search.service.dto.RoomBrokerDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * REST controller for managing {@link com.room.search.domain.RoomBroker}.
 */
@RestController
@RequestMapping("/api/broker")
public class RoomBrokerResource {

    private final Logger log = LoggerFactory.getLogger(RoomBrokerResource.class);

    private final RoomBrokerService roomBrokerService;

    public RoomBrokerResource(RoomBrokerService roomBrokerService) {
        this.roomBrokerService = roomBrokerService;
    }

    /**
     * 查询所有房产经纪人
     */
    @GetMapping("/all")
    public TableDataInfo getAllBroker(RoomBrokerDTO dto) {
        return roomBrokerService.getAllBroker(dto);
    }
}
